package model;

/*
 * Class to model information related to a user.
 * @author Jeff Kuhlman
 */
public class User {
	
	// Field to hold unique user id
	private  int my_id;
	
	// Field to hold user name
	private final String my_name;
	
	// Field to hold email
	private final String my_email;
	
	// Field to hold user role
	private Role my_role;

	public User(int the_id, String the_name, String the_email) {
		my_id = the_id;
		my_name = the_name;
		my_email = the_email;
		my_role = Role.NOT_ASSIGNED;
	}
	
	// Getter for user id
	public int getID() {
		return my_id;
	}
	
	// Getter for user name
	public String getName() {
		return my_name;
	}
	
	// Getter for user email
	public String getEmail() {
		return my_email;
	}
	
	// Setter for user role
	public void setRole(Role the_role) {
		my_role = the_role;
	}
	
	// Getter for user role
	public Role getRole() {
		return my_role;
	}

	// Setter for user ID
	public void setID(int ID)
	{
		my_id = ID;
	}
	
	@Override
	public String toString() {
		return (my_name + " as " + my_role.toString());
	}
}